/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.SysNoticePo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.SysNoticeSqlProvider;

@Mapper
public interface ISysNoticeMapper {
	/**
	 * 新增SysNoticePo对象
	 * 
	 * @param SysNoticePo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=SysNoticeSqlProvider.class,  method="addSysNotice") 
	public Integer addSysNotice(SysNoticePo sysNotice);

	/**
	 * 更新SysNoticePo对象
	 * 
	 * @param sysNoticePo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=SysNoticeSqlProvider.class,  method="updateSysNotice") 
	public Integer updateSysNotice(SysNoticePo sysNotice);
	
	/**
	 * 根据ID删除SysNoticePo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=SysNoticeSqlProvider.class,  method="delSysNotice") 
	public Integer delSysNoticeById(Integer id);

	/**
	 * 根据IDS删除SysNoticePo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<SysNoticePo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM sys_notice WHERE id IN (#{ids})")
	public Integer delSysNoticeByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找SysNoticePo对象，默认根据ID降序
	 * 
	 * @param sysNoticePo
	 * @Author 迷蝶
	 * @return List<SysNoticePo>
	 */
	@SelectProvider(type=SysNoticeSqlProvider.class,  method="findSysNotices") 
	public List<SysNoticePo> findSysNotices(SysNoticePo sysNotice);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param sysNoticePo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=SysNoticeSqlProvider.class,  method="findSysNoticeCount") 
	public Integer findSysNoticeCount(SysNoticePo sysNotice);

	/**
	 * 根据ID查找SysNoticePo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return SysNoticePo
	 */
	@SelectProvider(type=SysNoticeSqlProvider.class,  method="findSysNoticeById") 
	public SysNoticePo findSysNoticeById(Integer id);
	
}